<?php

namespace Database\Factories;

use App\Models\Integrallog;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;

class IntegrallogFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var string
     */
    protected $model = Integrallog::class;

    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        return [
            'title' => $this->faker->randomElement(['sign','luck_draw','order','purchase_goods']),
            'user_id' => $this->faker->randomElement(User::pluck('id')),
            'front_integral' => $this->faker->numberBetween(20,200),
            'get_points' => $this->faker->randomElement([10,15,20]),
            'type' => $this->faker->randomElement([0,1]),
            'remarks' => $this->faker->text(5),
        ];
    }
}
